<?php
$this->breadcrumbs = array(
    'Packages',
);
?>
<div class = "box">
    <header>
        <div class = "icons"><i class = "icon-tasks"></i></div>
        <h5>Packages manager</h5>
    </header>
    <div class = "body">
        <?php
        $this->widget('bootstrap.widgets.TbGridView', array(
            'dataProvider' => $model->search(),
            'filter' => $model,
            'type' => 'bordered condensed striped',
            'columns' => array(
                'id',
                'name',
                'price',
                'delivery',
                'report_length',
                array(
                    //Button Group
                    'header' => 'Action',
                    'value' => function($data) {
                        app()->getController()->widget('bootstrap.widgets.TbButtonGroup', array(
                            'size' => 'mini',
                            'type' => 'inverse', // '', 'primary', 'info', 'success', 'warning', 'danger' or 'inverse'
                            'buttons' => array(
                                array(
                                    'icon' => 'align-right',
                                    'type' => '',
                                    'items' => array(
                                        array(
                                            'label' => 'View',
                                            'url' => url('package/view', array('id' => $data->id))
                                        ),
                                        array(
                                            'label' => 'Update',
                                            'url' => url('package/update', array('id' => $data->id)),
                                        ),
                                    ),
                                ),
                            ),
                        ));
                    }
                )
            )
        ));
        ?>
    </div>
</div>
